package me.ZFC.Text;

public class Test14 {
    public static void main(String[] args) {
        String a = "abcde";
        String b = "cdeab";
      String s=rotate(a);
      System.out.println(s);
    }

    public static String rotate(String str) {
        char[] arr = str.toCharArray();
        char first = arr[0];
        for (int i = 1; i < arr.length; i++) {
            arr[i - 1] = arr[i];
        }
        arr[arr.length - 1] = first;
        String result = new String(arr);
        return result;
    }
}
